Home:ALL Converter>Openstack install fail on RabbitMQ - Centos8

Openstack install fail on RabbitMQ - Centos8

Ask Time:2021-05-16T02:25:43         Author:Thomson Mathew

Json Formatter

I am following this post to install Packstack on my Centos8 server. Everything goes fine until I reach this install step - "packstack --answer-file /root/openstack-answer.txt". Here is the error;

...
...
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.168.171_controller.pp
192.168.168.171_controller.pp:                    [ ERROR ]
Applying Puppet manifests                         [ ERROR ]

ERROR : Error appeared during Puppet run: 192.168.168.171_controller.pp
Error: Facter: error while resolving custom fact "rabbitmq_nodename": undefined method `[]' for nil:NilClass
You will find full trace in log /var/tmp/packstack/20210515-120855-k817cwco/manifests/192.168.168.171_controller.pp.log
Please check log file /var/tmp/packstack/20210515-120855-k817cwco/openstack-setup.log for more information
Additional information:
 * Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 192.168.168.171. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.168.171/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.

Here is the openstack-setup.log

2021-05-15 12:08:56::INFO::shell::100::root:: [localhost] Executing script:
rm -rf /var/tmp/packstack/20210515-120855-k817cwco/manifests/*pp
2021-05-15 12:08:56::INFO::shell::100::root:: [localhost] Executing script:
mkdir -p ~/.ssh
chmod 500 ~/.ssh
grep 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCn8amY2BL11DJlLFjnAgxseuUag93JnVXxmnUpiEvKC2GfYcMq6fEjdqlj5be70V1LRRP4dlHkp2HhkM3dWsp/sDVLUGJIXqwmI08QiEuW7JR35pfnATTf+aw2FgRf/0yvR4uH9oWXw2R909ZEPdqcpD8T72Cz4rAcJjWA3IdWilOIGGxCs3yLN7t2v7RAaIHwEsURiI8DWRo4LcvwMw1dMhd2S4HvFu98uv7Nqd16rdlWR3QpJHZFK/4JLxWtK/7/Bf/o4RFKNlOH+mRmRlaxiT1O//zlKglUtMY/YkhbUhrMGB/jJSq6sSRlyxeLHrhrT3V4AbChH56jEMDOXnGL07FFHvVtWzJv0chyEL1Dav7Ua8N1QfoaHcfskem0rWXgtCs3QZjQWde7rFSGRg1/7cQpb51n9ZdXZagPHhLRNNI/eTKA5C2ed8p/KK1S00PNHSub4BP8Jsw5eVhUZAjZG38YfS536tORo0ciYj42dkAAVIWI44X8psU8BirQotU= [email protected]' ~/.ssh/authorized_keys > /dev/null 2>&1 || echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCn8amY2BL11DJlLFjnAgxseuUag93JnVXxmnUpiEvKC2GfYcMq6fEjdqlj5be70V1LRRP4dlHkp2HhkM3dWsp/sDVLUGJIXqwmI08QiEuW7JR35pfnATTf+aw2FgRf/0yvR4uH9oWXw2R909ZEPdqcpD8T72Cz4rAcJjWA3IdWilOIGGxCs3yLN7t2v7RAaIHwEsURiI8DWRo4LcvwMw1dMhd2S4HvFu98uv7Nqd16rdlWR3QpJHZFK/4JLxWtK/7/Bf/o4RFKNlOH+mRmRlaxiT1O//zlKglUtMY/YkhbUhrMGB/jJSq6sSRlyxeLHrhrT3V4AbChH56jEMDOXnGL07FFHvVtWzJv0chyEL1Dav7Ua8N1QfoaHcfskem0rWXgtCs3QZjQWde7rFSGRg1/7cQpb51n9ZdXZagPHhLRNNI/eTKA5C2ed8p/KK1S00PNHSub4BP8Jsw5eVhUZAjZG38YfS536tORo0ciYj42dkAAVIWI44X8psU8BirQotU= [email protected] >> ~/.ssh/authorized_keys
chmod 400 ~/.ssh/authorized_keys
restorecon -r ~/.ssh
2021-05-15 12:08:56::INFO::shell::100::root:: [192.168.168.171] Executing script:
rpm -q --whatprovides yum-utils || yum install -y yum-utils
2021-05-15 12:08:56::INFO::shell::49::root:: Executing command:
rpm -qa --qf='%{name}-%{version}-%{release}.%{arch}
' | grep centos-release-openstack
2021-05-15 12:09:10::INFO::shell::100::root:: [192.168.168.171] Executing script:
(rpm -q 'centos-release-openstack-ussuri' || yum -y install centos-release-openstack-ussuri) || true
2021-05-15 12:09:10::INFO::shell::49::root:: Executing command:
rpm -q rdo-release --qf='%{version}-%{release}.%{arch}
'
2021-05-15 12:09:10::INFO::shell::100::root:: [192.168.168.171] Executing script:
rpm -q --whatprovides yum-utils || yum install -y yum-utils
yum clean metadata
2021-05-15 12:09:11::INFO::shell::100::root:: [192.168.168.171] Executing script:
yum install -y puppet hiera openssh-clients tar nc rubygem-json
yum update -y puppet hiera openssh-clients tar nc rubygem-json
rpm -q --whatprovides puppet
rpm -q --whatprovides hiera
rpm -q --whatprovides openssh-clients
rpm -q --whatprovides tar
rpm -q --whatprovides nc
rpm -q --whatprovides rubygem-json
2021-05-15 12:09:38::INFO::shell::100::root:: [192.168.168.171] Executing script:
mkdir -p /var/tmp/packstack
mkdir --mode 0700 /var/tmp/packstack/18227dca781e48cda2db45952d159190
mkdir --mode 0700 /var/tmp/packstack/18227dca781e48cda2db45952d159190/modules
mkdir --mode 0700 /var/tmp/packstack/18227dca781e48cda2db45952d159190/resources
2021-05-15 12:09:38::INFO::shell::100::root:: [192.168.168.171] Executing script:
facter -p
2021-05-15 12:09:42::INFO::shell::100::root:: [192.168.168.171] Executing script:
[[ -f /etc/hiera.yaml ]] && [[ ! -L /etc/puppet/hiera.yaml ]] && ln -s /etc/hiera.yaml /etc/puppet/hiera.yaml || echo "skipping creation of  hiera.yaml symlink"
sed -i 's;:datadir:.*;:datadir: /var/tmp/packstack/18227dca781e48cda2db45952d159190/hieradata;g' $(puppet config print hiera_config)
2021-05-15 12:09:43::INFO::shell::100::root:: [192.168.168.171] Executing script:
vgdisplay cinder-volumes
2021-05-15 12:09:43::INFO::shell::100::root:: [localhost] Executing script:
ssh-keygen -t rsa -b 2048 -f "/var/tmp/packstack/20210515-120855-k817cwco/nova_migration_key" -N ""
2021-05-15 12:09:43::INFO::shell::100::root:: [localhost] Executing script:
ssh-keyscan 192.168.168.171
2021-05-15 12:09:43::INFO::shell::100::root:: [192.168.168.171] Executing script:
systemctl
2021-05-15 12:09:43::INFO::shell::100::root:: [192.168.168.171] Executing script:
systemctl is-enabled NetworkManager
2021-05-15 12:09:44::INFO::shell::100::root:: [192.168.168.171] Executing script:
systemctl is-active NetworkManager
2021-05-15 12:09:44::INFO::shell::100::root:: [192.168.168.171] Executing script:
echo $HOME
2021-05-15 12:09:44::INFO::shell::100::root:: [localhost] Executing script:
cd /var/tmp/packstack/20210515-120855-k817cwco/hieradata
tar --dereference -cpzf - ../hieradata | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] tar -C /var/tmp/packstack/18227dca781e48cda2db45952d159190 -xpzf -
cd /usr/lib/python3.6/site-packages/packstack/puppet
cd /var/tmp/packstack/20210515-120855-k817cwco/manifests
tar --dereference -cpzf - ../manifests | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] tar -C /var/tmp/packstack/18227dca781e48cda2db45952d159190 -xpzf -
cd /usr/share/openstack-puppet/modules
tar --dereference -cpzf - aodh apache ceilometer certmonger cinder concat firewall glance gnocchi heat horizon inifile ironic keystone magnum manila memcached mysql neutron nova nssdb openstack openstacklib oslo ovn packstack panko placement rabbitmq redis remote rsync sahara ssh stdlib swift sysctl systemd tempest trove vcsrepo vswitch xinetd | ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] tar -C /var/tmp/packstack/18227dca781e48cda2db45952d159190/modules -xpzf -
2021-05-15 12:25:43::ERROR::run_setup::1062::root:: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/packstack/installer/run_setup.py", line 1057, in main
    _main(options, confFile, logFile)
  File "/usr/lib/python3.6/site-packages/packstack/installer/run_setup.py", line 681, in _main
    runSequences()
  File "/usr/lib/python3.6/site-packages/packstack/installer/run_setup.py", line 648, in runSequences
    controller.runAllSequences()
  File "/usr/lib/python3.6/site-packages/packstack/installer/setup_controller.py", line 81, in runAllSequences
    sequence.run(config=self.CONF, messages=self.MESSAGES)
  File "/usr/lib/python3.6/site-packages/packstack/installer/core/sequences.py", line 109, in run
    step.run(config=config, messages=messages)
  File "/usr/lib/python3.6/site-packages/packstack/installer/core/sequences.py", line 50, in run
    self.function(config, messages)
  File "/usr/lib/python3.6/site-packages/packstack/plugins/puppet_950.py", line 215, in apply_puppet_manifest
    wait_for_puppet(currently_running, messages)
  File "/usr/lib/python3.6/site-packages/packstack/plugins/puppet_950.py", line 128, in wait_for_puppet
    validate_logfile(log)
  File "/usr/lib/python3.6/site-packages/packstack/modules/puppet.py", line 107, in validate_logfile
    raise PuppetError(message)
packstack.installer.exceptions.PuppetError: Error appeared during Puppet run: 192.168.168.171_controller.pp
Error: Facter: error while resolving custom fact "rabbitmq_nodename": undefined method `[]' for nil:NilClass
You will find full trace in log /var/tmp/packstack/20210515-120855-k817cwco/manifests/192.168.168.171_controller.pp.log

2021-05-15 12:25:43::INFO::shell::100::root:: [192.168.168.171] Executing script:
rm -rf /var/tmp/packstack/18227dca781e48cda2db45952d159190

Here is the controller.pp.log

    Error: Facter: error while resolving custom fact "rabbitmq_nodename": undefined method `[]' for nil:NilClass
Warning: The function 'hiera' is deprecated in favor of using 'lookup'. See https://puppet.com/docs/puppet/6.14/deprecated_language.html
   (file & line not available)
Warning: /etc/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
   (file: /etc/puppet/hiera.yaml)
...
...
Notice: /Stage[main]/Swift/Swift_config[swift-hash/swift_hash_path_suffix]/value: value changed 2399ecebcf7a4128 to 00a7d595320749e9
Notice: /Stage[main]/Swift::Proxy::Authtoken/Swift_proxy_config[filter:authtoken/password]/value: value changed dc6fbb7c617a48c0 to e2187def7d184d58
Error: Systemd start for rabbitmq-server failed!
journalctl log for rabbitmq-server:
-- Logs begin at Sat 2021-05-15 11:54:15 CDT, end at Sat 2021-05-15 12:18:53 CDT. --
May 15 12:18:23 openstack systemd[1]: Starting RabbitMQ broker...
May 15 12:18:23 openstack rabbitmq-server[11773]: 2021-05-15 12:18:23 [warning] Both old (.config) and new (.conf) format config files exist.
May 15 12:18:23 openstack rabbitmq-server[11773]:                               Using the old format config file: /etc/rabbitmq/rabbitmq.config
May 15 12:18:23 openstack rabbitmq-server[11773]:                               Please update your config files to the new format and remove the old file.
May 15 12:18:53 openstack rabbitmq-server[11773]: ERROR: epmd error for host openstack: timeout (timed out)
May 15 12:18:53 openstack systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
May 15 12:18:53 openstack systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
May 15 12:18:53 openstack systemd[1]: Failed to start RabbitMQ broker.

Error: /Stage[main]/Rabbitmq::Service/Service[rabbitmq-server]/ensure: change from 'stopped' to 'running' failed: Systemd start for rabbitmq-server failed!
journalctl log for rabbitmq-server:
-- Logs begin at Sat 2021-05-15 11:54:15 CDT, end at Sat 2021-05-15 12:18:53 CDT. --
May 15 12:18:23 openstack systemd[1]: Starting RabbitMQ broker...
May 15 12:18:23 openstack rabbitmq-server[11773]: 2021-05-15 12:18:23 [warning] Both old (.config) and new (.conf) format config files exist.
May 15 12:18:23 openstack rabbitmq-server[11773]:                               Using the old format config file: /etc/rabbitmq/rabbitmq.config
May 15 12:18:23 openstack rabbitmq-server[11773]:                               Please update your config files to the new format and remove the old file.
May 15 12:18:53 openstack rabbitmq-server[11773]: ERROR: epmd error for host openstack: timeout (timed out)
May 15 12:18:53 openstack systemd[1]: rabbitmq-server.service: Main process exited, code=exited, status=1/FAILURE
May 15 12:18:53 openstack systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
May 15 12:18:53 openstack systemd[1]: Failed to start RabbitMQ broker.

Notice: /Stage[main]/Swift::Deps/Anchor[swift::config::end]: Triggered 'refresh' from 2 events
Notice: /Stage[main]/Swift::Deps/Anchor[swift::service::begin]: Triggered 'refresh' from 2 events
Notice: /Stage[main]/Keystone::Deps/Anchor[keystone::config::end]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone/Exec[keystone-manage fernet_setup]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone::Db::Mysql/Openstacklib::Db::Mysql[keystone]/Openstacklib::Db::Mysql::Host_access[keystone_%]/Mysql_user[keystone_admin@%]/password_hash: changed password
Notice: /Stage[main]/Keystone::Db::Mysql/Openstacklib::Db::Mysql[keystone]/Openstacklib::Db::Mysql::Host_access[keystone_127.0.0.1]/Mysql_user[[email protected]]/password_hash: changed password
Notice: /Stage[main]/Keystone::Deps/Anchor[keystone::db::end]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone::Deps/Anchor[keystone::dbsync::begin]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone::Db::Sync/Exec[keystone-manage db_sync]: Triggered 'refresh' from 2 events
Notice: /Stage[main]/Keystone::Deps/Anchor[keystone::dbsync::end]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone::Bootstrap/Exec[keystone bootstrap]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Keystone::Deps/Anchor[keystone::service::begin]: Triggered 'refresh' from 4 events
Warning: /Stage[main]/Apache::Service/Service[httpd]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Deps/Anchor[keystone::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Gnocchi::Deps/Anchor[gnocchi::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Aodh::Deps/Anchor[aodh::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Placement::Deps/Anchor[placement::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Cron::Fernet_rotate/Cron[keystone-manage fernet_rotate]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone/Keystone_domain[Default]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone/Exec[restart_keystone]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone/Anchor[default_domain_created]: Skipping because of failed dependencies
Warning: /Stage[main]/Packstack::Keystone/Keystone_role[_member_]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_role[admin]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_user[admin]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_tenant[services]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_tenant[admin]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_user_role[admin@admin]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_service[keystone::identity]: Skipping because of failed dependencies
Warning: /Stage[main]/Keystone::Bootstrap/Keystone_endpoint[RegionOne/keystone::identity]: Skipping because of failed dependencies
Warning: /Stage[main]/Horizon::Deps/Anchor[horizon::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Swift::Keystone::Auth/Keystone_role[SwiftOperator]: Skipping because of failed dependencies
Warning: /Stage[main]/Swift::Keystone::Auth/Keystone_role[ResellerAdmin]: Skipping because of failed dependencies
Warning: /Stage[main]/Heat::Keystone::Auth/Keystone_role[heat_stack_user]: Skipping because of failed dependencies
Warning: /Stage[main]/Heat::Keystone::Auth/Keystone_role[heat_stack_owner]: Skipping because of failed dependencies
Warning: /Stage[main]/Heat::Keystone::Domain/Keystone_domain[heat]: Skipping because of failed dependencies
Warning: /Stage[main]/Heat::Keystone::Domain/Keystone_user[heat_admin::heat]: Skipping because of failed dependencies
Warning: /Stage[main]/Heat::Keystone::Domain/Keystone_user_role[heat_admin::heat@::heat]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Keystone::Auth/Keystone::Resource::Service_identity[glance]/Keystone_user[glance]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Keystone::Auth/Keystone::Resource::Service_identity[glance]/Keystone_user_role[glance@services]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Keystone::Auth/Keystone::Resource::Service_identity[glance]/Keystone_service[glance::image]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Keystone::Auth/Keystone::Resource::Service_identity[glance]/Keystone_endpoint[RegionOne/glance::image]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Deps/Anchor[glance::service::begin]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Api/Service[glance-api]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Registry/Service[glance-registry]: Skipping because of failed dependencies
Warning: /Stage[main]/Glance::Deps/Anchor[glance::service::end]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinder]/Keystone_user[cinder]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinder]/Keystone_user_role[cinder@services]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinderv2]/Keystone_service[cinderv2::volumev2]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinderv2]/Keystone_endpoint[RegionOne/cinderv2::volumev2]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinderv3]/Keystone_service[cinderv3::volumev3]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Keystone::Auth/Keystone::Resource::Service_identity[cinderv3]/Keystone_endpoint[RegionOne/cinderv3::volumev3]: Skipping because of failed dependencies
Warning: /Stage[main]/Cinder::Deps/Anchor[cinder::service::end]: Skipping because of failed dependencies
Error: Could not prefetch cinder_type provider 'openstack': Could not authenticate
Error: Failed to apply catalog: Could not authenticate

I could see that people have experienced the similar issues but those solutions did not work for me. I also have done below steps.

  • Verify the hostname and host file
  • Opened the port or disabled the firewalld
  • Disabled the SELINUX

I changed hostname to openstack and here is my host file

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
<my-ip>     openstack

I am not sure is that a hostname issue or firewall or anything else. I have been struggling this for quite sometime and a help would be greately appreciated

Author:Thomson Mathew,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67550020/openstack-install-fail-on-rabbitmq-centos8
yy